<script type="text/javascript" src='<?php echo site_url();?>js/ckeditor/ckeditor.js'></script>
<article class="module width_3_quarter">
	<form action="<?php echo base_url('/index.php/admin/news/add');?>" method="POST">
	<header><h3>Add news</h3></header>
	<div class="module_content">
		<fieldset style="width:100%;float:left;">
			<label>Title</label>
			<input type="text" style="width:90%;" name="title"/>
		</fieldset>
		<fieldset style="width:100%;float:left;">
			<label>News type</label>
			<select name="companyid" style="width:90%;height: 24px;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;background-color: white;">
				<option value="0">General news</option>
				<?php
				if (isset($companies) && is_array($companies)){
					foreach ($companies as $company){?>
				<option value='<?php echo $company->id;?>'><?php echo $company->name;?></option><?php
					}
				}
				?>
			</select>
		</fieldset>
		<div class="clear"></div>
		<fieldset>
			<label>Description</label>
			<textarea name="content" id="content" rows="8"></textarea>
                <script type="text/javascript">
            	//<![CDATA[
                var editor = CKEDITOR.replace( 'content',{
                        skin : 'kama',
                        filebrowserBrowseUrl : '/js/ckfinder/ckfinder.html',
                        filebrowserImageBrowseUrl : '/js/ckfinder/ckfinder.html?type=Images',
                        filebrowserImageUploadUrl : '/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                        filebrowserFlashUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
                    });
	            //]]>
	            </script>
                <?php
                    //echo $editor->replace('contents');
                ?>
		</fieldset>
	</div>
	<footer>
		<div class="submit_link">
			<input type="submit" value="Add" class="alt_btn">
			<input type="reset" value="Reset" onclick="">
		</div>
	</footer>
	</form>
</article>